package com.yserp.project.erp.store.outorder.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yserp.framework.aspectj.lang.annotation.Excel;
import com.yserp.framework.web.domain.BaseEntity;
import com.yserp.project.erp.common.anno.MybatisLikeSearch;
import lombok.Data;

import java.util.Date;

/**
 * 商品出库单主对象 erp_out_order
 *
 * @author yserp
 * @date 2022-07-13
 */
@TableName("erp_out_order")
@Data
public class OutOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 出库类型(领料出库、销售出库)
     */
    @Excel(name = "出库类型",readConverterExp = "1=领料出库,2=销售出库")
    private String orderType;

    /**
     * 出库单编号
     */
    @Excel(name = "出库单编号")
    @MybatisLikeSearch
    private String orderCode;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    @MybatisLikeSearch
    private String orderName;

    /**
     * 来源订单ID
     */
    private Long sourceOrderId;

    /**
     * 来源订单编号
     */
    @Excel(name = "来源上游订单号")
    @MybatisLikeSearch
    private String sourceOrderCode;

    /**
     * 订单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /**
     * 客户主键ID
     */
    private Long customerId;

    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    @MybatisLikeSearch
    private String customerName;

    /**
     * 仓库主键ID
     */
    private Long warehouseId;

    /**
     * 仓库名称
     */
    @Excel(name = "仓库名称")
    @MybatisLikeSearch
    private String warehouseName;

    /**
     * 承运商ID
     */
    private Long carriersId;

    /**
     * 承运商名称
     */
    @Excel(name = "承运商名称")
    @MybatisLikeSearch
    private String carriersName;

    /**
     * 订单状态
     */
    @Excel(name = "订单状态",readConverterExp = "0=待审核,1=已审核")
    private String status;

    /**
     * 执行状态
     */
    private String execStatus;

    /**
     * 关联入库单主键
     */
    private Long warehousingOrderId;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;


}
